  <#include "./pc/header.html">
                <ul class="h_tool" id="toolBtn">
 
             	<li class="h_t_item btn"  href="${s.base}/i/pcindex/${Session ["province"]!}"   id="weixin_equip"><div>设备信息</div></li>
   
                <li class="h_t_item split admin"  > </li>
                <li class="h_t_item btn   admin"     href="${s.base}/admin/index/${Session ["province"]!}"  id="weixin_admin"><div >后台管理</div></li>
             	
             </ul>  
             
		</div>
		<div class="mcontent">
			<#include   "./pc/leftnave.html">
			<!-- 右侧body区域 -->
			<div class="c_body  " >
				 
				 
					<div class="page_view">
					    <div class="ds_tool  colorable shadow  ">
					    
					        <span class="title"></span>
							 
						</div>
						<div class="ds_view">
							<div id="map_area">
							</div>
						
						
					     </div>
					</div>
		 </div>
		 <!-- end c_body -->
		</div>

     

	
	     
 
	   <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=WqYQM9vVnQ2VQf2KcjWGR2BP"></script>
		<script type="text/javascript" src="${s.base}/res/pc/js/BDComplexMarket.js"></script> 	
		
		
       <script>
       
      
     $(function(){
          	
          	
          	var tar=$(".nav_items");
          	tar.load(tar.attr("tar"));
          	// 左上角功能切换
          	$(".h_t_item").on(
          			"click",
          			function() { 
          				toolEvent($(this));
          				if ($(this).attr("id").indexOf("weixin_equip") > -1) {
          					location.href=$(this).attr("href");
          				} 			
          	 });
		          
		         	
		   // // 树形结构菜单点击

		  var map=	initMap("map_area");
		                	
		  $("body").on("levelClick",function(e,tar){
		       
				 //设置地图的中心位置为当前选中的点
			        var 	_this=$(tar);
				   var  gtar=_this.children(".glocation");
				   var  points=gtar.val().split(",");
				   if(points.length<2) {
					   var msg={success:false,desc:"该设备坐标参数不全！"}
					 //  showTipInfo(msg);
				   }
				   else
				   map.panTo(new BMap.Point(points[0],points[1]));
				 //设置marker 文本的 高亮联动选中
		        var mid="#m_"+_this.attr("puid");
		        $(".mapInfo.active").removeClass("active");	
		        $(mid).addClass('active');
		        
		        
	    	}); 
		                	
        	// // 树形结构菜单点击
 
        	//去掉地图上 已经存在的 marker，添加当前选择的marker  
        	
    		function displayLocation(){
    			map.clearOverlays();
    		   var items=$("#userdep .level_2");
    		   var paned=false;
    		   items.each(function(index){ 
    			   var tar=$(this);
    			   var name=tar.children(".name").html();
    			//   console.log(tar.children(".check")[0].checked);
    			 //  console.log(tar.children(".period").val());
    			  var  gtar=tar.children(".glocation");
    			   var  points=gtar.val().split(",");
    			   if(points.length>1){
                         if(paned==false){
                        	 map.panTo(new BMap.Point(points[0],points[1]));
                        	 $(".ds_tool .title").html(name);
                             paned=true;
                         }
        			   var marker=   addMarker(map,new BMap.Point(points[0],points[1]),name,tar.attr("puid"));
        			   tar.data("marker",marker);
    			   }
    		   });
    			
    		}
        	 //设备加载完成，通过loadok事件 在地图上显示
        	  $("#groupSource #userdep").bind('loadok',function(){//dom为一个html元素
                 
                  displayLocation();
               })    
		                	/////////////
      })
         
	     </script>
	     
	     
  <#include "./pc/flooder.html">
